package com.swjd.sbm.dao;

import com.swjd.sbm.entity.Api_syjpinglun;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface Api_syjpinglunMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Api_syjpinglun record);

    int insertSelective(Api_syjpinglun record);

    Api_syjpinglun selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Api_syjpinglun record);

    int updateByPrimaryKeyWithBLOBs(Api_syjpinglun record);

    int updateByPrimaryKey(Api_syjpinglun record);

    List<Map<String,Object>> getpinglun(@Param("page")int page,@Param("pagesize")int pagesize,@Param("tid")int tid);

    @Select("SELECT COUNT(*) FROM api_syjpinglun WHERE tid = #{tid}")
    int pagesize(@Param("tid")int tid);

    @Insert("INSERT INTO api_syjpinglun VALUES(NULL,#{date},0,#{text},'o9niW5DISKyuxnrZ-4LoseOXjgBQ',1,#{id})")
    int  addp(String id,String text,String date);
}